﻿@using QDT.Core.Projects
@using QDT.MVC
@model Project
@{
    var feilds = ViewData["Feilds"] as IList<ProjectFeild>;
    ProjectFeild companyAddr = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("CompanyAddr"));
    ProjectFeild hangye = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("hangye"));
    ProjectFeild zcnx = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("zcnx"));
    ProjectFeild zczj = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("zczj"));
    ProjectFeild ssqk = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("ssqk"));
    ProjectFeild zxjl = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("zxjl"));
    ProjectFeild jyqk = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("jyqk"));
}

<div class="ui-box-mian">
    <div class="ui-box-hd">
        <h3 class="ui-box-title">企业信息</h3>
    </div>
    <table class="ui-project-detail">
        <tr>
            <td class="title">所在区域：</td>
            <td>
                @if (companyAddr != null)
                {
                    @Model.GetAttribute(companyAddr.ID)
                }
            </td>
            <td class="title">所属行业：</td>
            <td>
                @if (hangye != null)
                {
                    @Model.GetAttribute(hangye.ID)
                }          
            </td>
        </tr>
        <tr>
            <td class="title">注册时间：</td>
            <td>
                @if (zcnx != null)
                {
                    @Model.GetAttribute(zcnx.ID)
                }      
            </td>
            <td class="title">注册资金：</td>
            <td>
                @if (zczj != null)
                {
                    @(Model.GetAttribute(zczj.ID))
                }      
            </td>
        </tr>
        <tr>
            <td class="title">经营情况：</td>
            <td class="colspan" colspan="3">
                @if (jyqk != null)
                {
                    @Model.GetAttribute(jyqk.ID).ToHtml()
                }      
            </td>
        </tr>
        <tr>
            <td class="title">涉诉情况：</td>
            <td class="colspan" colspan="3">
                @if (ssqk != null)
                {
                    @Model.GetAttribute(ssqk.ID).ToHtml()
                }      
            </td>
        </tr>
        <tr>
            <td class="title">征信记录：</td>
            <td class="colspan" colspan="3">
                @if (zxjl != null)
                {
                    @Model.GetAttribute(zxjl.ID).ToHtml()
                }     
            </td>
        </tr>
   
@if (Model.TypeID == 9 || Model.TypeID == 3)
{
    var dbh = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("dbh"));
    var dbgs = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("dbgs"));
    var dbqk = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("dbqk"));
    var fxkzzs = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("fxkzzs"));
    var fdbqk = feilds == null ? null : feilds.FirstOrDefault(x => x.Name.Contains("fdbqk"));
    
        <tr>
            <td class="title">担保公司：</td>
            <td>
                @if (dbgs != null)
                {
                    @Model.GetAttribute(dbgs.ID)
                }
            </td>
        </tr>
        <tr>
            <td class="title">担保情况：</td>
            <td class="colspan" colspan="3">
                @if (dbqk != null)
                {
                    @Model.GetAttribute(dbqk.ID).ToHtml()
                }      
            </td>
        </tr>
@*        <tr>*@
@*            <td class="title">反担保情况：</td>*@
@*            <td class="colspan" colspan="3">*@
@*                @if (fdbqk != null)*@
@*                {*@
@*                    @Model.GetAttribute(fdbqk.ID).ToHtml()*@
@*                }     *@
@*            </td>*@
@*        </tr>*@
        <tr>
            <td class="title">风险控制：</td>
            <td class="colspan" colspan="3">
                @if (fxkzzs != null)
                {
                    @Model.GetAttribute(fxkzzs.ID).ToHtml()
                }      
            </td>
        </tr>
}
    </table>
</div>